package org.gwt.mosaic.xul.client;

import org.gwt.mosaic.xul.client.ui.Element;

/**
 * Used to generate a new element. This interface is generated, for {@link Element} objects only. If bad className is given, 
 * <code>null</code> is returned.
 * <br/> <br/>
 * 
 * <b>Usage:</b>
 * <br/>
 * <code>
 * ElementInsantiator instantiator = GWT.create (ElementInstantiator.class);
 * Element instance = instantiator.instantiate (Vbox.class.getName ());
 * </code>
 * 
 * @author Alex Dobjanschi (alex.dobjanschi@gmail.com)
 *
 */
public interface ElementInstantiator {

	/**
	 * Called to instantiate a new element
	 * @param className
	 * @return
	 */
	public Element instantiate (String className);
	
}
